#include <stdio.h>
int main()
{
    float n;
    float rate;
    printf("请输入营业额(万元):");
    int ret = scanf("%f", &n);
    if (ret != 1)
    {
        printf("数据异常！");
        return 0;
    }
    if (n < 0)
    {
        printf("就这还能不赚钱？");
    }
    switch (n >= 100 ? 6 : n >= 60 ? 5
                       : n >= 40   ? 4
                       : n >= 20   ? 3
                       : n >= 10   ? 2
                                   : 1)
    {
    case 1:
        rate = 0.1;
        break;
    case 2:
        rate = 0.075;
        break;
    case 3:
        rate = 0.05;
        break;
    case 4:
        rate = 0.03;
        break;
    case 5:
        rate = 0.015;
        break;
    case 6:
        rate = 0.01;
        break;
    default:
        break;
    }
    printf("加盟费：%.3f*%.3f=%.3f(万元)", n, rate, n * rate);
}